<!DOCTYPE html>
<html>
    <#include "../head.html">
    <body class="full">
        <div class="mc">
            <div class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </div>
            <div class="mc-m">
                <div class="navToggle"></div>
            </div>
            <div class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="查看所有帐户">
                        <#include "banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">

                                <div class="toolbor-module export">
                                    <input type="button" onclick="exportxls()" value="导出列表" class="input-button export-btn"/>
                                    <#if param??&&param.status??>
                                        <#assign status=(param.get("status"))?number >
                                            <#else>
                                                <#assign status=-1>
                                    </#if>
                                    &nbsp;&nbsp;&nbsp;总额：<#if sum?? && sum[0]??>${sum[0]}</#if>
                                    &nbsp;|&nbsp;可用：<#if sum?? && sum[1]??>${sum[1]}</#if>
                                    &nbsp;|&nbsp;冻结：<#if sum?? && sum[2]??>${sum[2]}</#if>
                                    &nbsp;|&nbsp;待收：<#if sum?? && sum[3]??>${sum[3]}</#if>
                                    &nbsp;|&nbsp;待还：<#if sum?? && sum[4]??>${sum[4]}</#if>
                                </div>

                                <div class="toolbor-module search">
                                    <div class="formTit">用户名：</div>
                                    <input type="text" name="username" id="username" value="请输入用户名" class="search-value">
                                    <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                                </div>
                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                <form action="" method="post">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>ID</td>
                                            <td>用户名</td>
                                            <td>真实姓名</td>
                                            <td>总金额</td>
                                            <td>可用余额</td>
                                            <td>冻结金额</td>
                                            <td>待收金额</td>
                                            <td>待还金额</td>
                                            <td>净资产</td>
                                            <td>易极付账户信息</td>
                                        </tr>
                                        <#list list as item>
                                            <tr class="s">
                                                <td>${(item.id!0)?c}</td>
                                                <td>${item.user.showName!}</td>
                                                <td>${item.user.realName!}</td>
                                                <td>${item.total!0}</td>
                                                <td>${item.balance!0}</td>
                                                <td>${item.freeze!0}</td>
                                                <!--td>${item.useMoney!0}</td>
                                                <td>${item.noUseMoney!0}</td-->
                                                <td>${item.collection!0}</td>
                                                <td>${item.repay!0}</td>
                                                <td>${item.getOwnMoney()}</td>
                                                <td><a onclick='alertPop("账户信息","url:get?viewYjfAccount.html?userId=${item.user.userId?c}",550,500,"true","","true","text");' href="javascript:void(0)">查看</a></td>
                                            </tr>
                                        </#list>
                                    </table>
                                </form>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                    <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->

                                <script>
                                    var url = 'showAllAccount.html?search=true';
                                    var xlsurl='showAllAccount.html?type=export'

                                    function sousuo(){
                                        var sou = "";
                                        var username = $("#username").val();
                                        if (username!=null&&username!=""&&username!="undefine"&&username!="请输入用户名"){
                                            sou += "&username="+username;
                                        }
                                        if (sou!=""){
                                            location.href=url+sou;
                                        }
                                    }
                                    function exportxls(){
                                        var num='${(page.total)?c}';
                                        num=num.replace(",","");
                                        if(num>30000){ //条数自己定义，但必须小于65536
                                            alert("数据过多，请选择指定的时间进行数据查询导出！"); //提示信息根据不同的内容注意修改下。
                                            return false;
                                        }
                                        var sou = "";
                                        var username = $("#username").val();
                                        if (username!=null&&username!=""&&username!="undefine"&&username!="请输入用户名"){
                                            sou += "&username="+username;
                                        }
                                        if (sou!=""){
                                            location.href=xlsurl+sou;
                                        }else{
                                            location.href=xlsurl;
                                        }
                                    }

                                    $("#username").attr("value",getQueryString("username"));
                                    function getQueryString(name){
                                        var reg=new  RegExp("(^|&)"+name+"=([^&]*)(&|$)");
                                        var r =window.location.search.substr(1).match(reg);
                                        if(r!=null)
                                            return  unescape(r[2]);
                                        return  "请输入用户名";
                                    }
                                </script>
                            </div>
            </div>
        </div>
        <div class="mc-b"><#include "../foot.html"></div>
        <#include "../jsPage.html">
    </body>
</html>